package com.chuangsi.project.admin.service;


import com.baomidou.mybatisplus.extension.service.IService;
import com.chuangsi.project.admin.domain.PayOrder;
import com.chuangsi.project.admin.dto.app.index.*;
import com.chuangsi.project.admin.dto.app.order.ResPayOrderNotFinishDto;
import com.chuangsi.project.admin.dto.app.order.ResPlaceAnOrderDto;
import com.chuangsi.project.admin.dto.app.payorder.OfflinePayOrderDto;
import com.chuangsi.project.admin.dto.app.payorder.OnlinePayOrderDto;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * 订单表 服务类
 * </p>
 *
 * @author ywb
 * @since 2025-02-25
 */
public interface IPayOrderService extends IService<PayOrder> {

    /**
     * 修改订单状态
     * @param outTradeNo
     * @param status
     */
    void updateOrderstatus(String outTradeNo,Integer status);

    /**
     * 生成支付订单
     * @param orderType
     * @param sealId
     * @param money
     * @return
     */
    PayOrder generatePayOrder(Integer orderType, String sealId, String productId,BigDecimal money,String openId);

    /**
     * 获取支付成功但是未生产合同的订单
     * @return
     */
    List<ResPayOrderNotFinishDto> getNotFinishPayOrder();

    /**
     * 线下支付-支付成功
     * @param payOrderDto
     */
    void offlinePay(OfflinePayOrderDto payOrderDto);

    /**
     * 获取支付状态
     * @param payOrderId
     * @return
     */
    Integer getPayStatus(Long payOrderId);

    /**
     * 线上支付-拉起支付
     * @param payOrderDto
     */
    ResPlaceAnOrderDto onlinePay(OnlinePayOrderDto payOrderDto);
}
